// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Weapon.generated.h"

class UNiagaraSystem;

UCLASS()
class GAMETESTH_API AWeapon : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AWeapon();

protected:
	// Called when the game starts or when spawned
	virtual void BeginPlay() override;

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;
#if 1 /*Component*/
public:
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Weapon)
	UStaticMeshComponent* WeaponMesh;
	UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Weapon)
	class USphereComponent* SphereComp;
	UFUNCTION()
	virtual void OnOverlapBegin(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp,
		int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);

	UFUNCTION()
	virtual void OnOverlapEnd(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp,
		int32 OtherBodyIndex);
#endif

//#if 2 /*Attribute*/
public:
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Weapon)
	bool bRotate;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Weapon)
	float RotateSpeed;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Weapon)
	class USoundCue* SoundComp;
	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Weapon)
	class UNiagaraComponent* NiagaraComp;
	UNiagaraSystem* NiagaraSystem;

//#endif
};
